
#ifndef _SMART_VOICE__VOICERECO_ENGINE_H__INCLUDED_
#define _SMART_VOICE__VOICERECO_ENGINE_H__INCLUDED_

#include "Nebula.h"
#include "Tasks.h"
#include "VoiceRecoSession.h"
#include <memory>

namespace smartvoice {

using namespace nebula::sdk;

class VoiceRecoEngine : public ManagedService<VoiceRecoEngine>
{
	typedef TaskProcessor<VoiceRecoEngine> VoiceTaskHandler;

public:
	VoiceRecoEngine();

public:
	virtual NEBULA_ERROR_CODE OnInitialize();
	virtual NEBULA_ERROR_CODE OnStart();
	virtual void              OnStop();
	virtual void              OnFinalize();

private:
	NEBULA_ERROR_CODE VoiceTaskProc(std::auto_ptr<ITask> task);
	const char*       MatchSessPara(ITask* ptask);

private:
	IDoneTaskQueue*   _task_queue;
	VoiceSessionManager* _sess_manager;
};

} // namespace smartvoice

#endif // _SMART_VOICE__VOICERECO_ENGINE_H__INCLUDED_

